#if !defined(AFX_PAGECOMMANDCONFIG_H__3ABE6DCA_2E93_4EEA_A35D_649CBD4234A5__INCLUDED_)
#define AFX_PAGECOMMANDCONFIG_H__3ABE6DCA_2E93_4EEA_A35D_649CBD4234A5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// PageCommandConfig.h : header file
//

typedef enum
{
	PREFERENCE_COMMAND_HEAD,
	PREFERENCE_COMMAND,
	CUSTOM_COMMAND_HEAD,
	CUSTOM_COMMAND
}COMMAND_RECORD_TYPE;

class CCommandRecord  : public CXTPReportRecord
{
	DECLARE_SERIAL(CCommandRecord)
		
public:
	CCommandRecord();
	CCommandRecord(COMMAND_RECORD_TYPE type, CString name = "", CString command = "");
	CString GetName();
	CString GetCommand();
	int GetCmdCode();
	COMMAND_RECORD_TYPE GetType();
	void SetName(CString Name);
	void SetCommand(CString Command);
	void SetCmdCode(int CmdCode);
	void Update();
private:
	CString m_Name;
	CString m_Command;
	int m_CmdCode;
	COMMAND_RECORD_TYPE m_Type;
};

class CRptItemCommand : public CXTPReportRecordItemText
{
public:
	CRptItemCommand(LPCSTR szText = _T(""));
	virtual void OnInplaceButtonDown(CXTPReportInplaceButton* pButton);
};

/////////////////////////////////////////////////////////////////////////////
// CPageCommandConfig dialog

class CPageCommandConfig : public CXTPPropertyPage
{
	DECLARE_DYNCREATE(CPageCommandConfig)
// Construction
public:
	void ShowReportData();
	void SetSize();
	void CreateCtrl();
	CPageCommandConfig();   // standard constructor

// Dialog Data
	//{{AFX_DATA(CPageCommandConfig)
	enum { IDD = IDD_PAGE_COMMANDCONFIG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPageCommandConfig)
	public:
	virtual void OnOK();
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CPageCommandConfig)
	virtual BOOL OnInitDialog();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnButtonAdd();
	afx_msg void OnButtonDel();
	afx_msg void OnButtonDown();
	afx_msg void OnButtonUp();
	//}}AFX_MSG
	afx_msg void OnDataChanged(NMHDR * pNotifyStruct, LRESULT * result);
	DECLARE_MESSAGE_MAP()
private:
	void UpdateFooterRecord();
	void SetReziseCtrl();
	CXTPReportControl m_wndReport;
	CXTPToolBar m_ToolBar;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PAGECOMMANDCONFIG_H__3ABE6DCA_2E93_4EEA_A35D_649CBD4234A5__INCLUDED_)
